home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / rexxutil.zip / REXXUTIL.INF (.txt) < prev    next >
OS/2 Help File  |  1991-03-18  |  40KB  |  1,705 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. OS/2 REXXUTIL Dynamic Link Library Reference 
  5. Version 1.10
  6. (c) Copyright W. David Ashley, 1990, 1991. All rights reserved.
  7. Program and Documentation by 
  8. W. David Ashley 
  9.  
  10. No warranties, guarantees, etc. are implied, and no liability is assumed for 
  11. the code, examples, DLLs, or documentation. 
  12.  
  13. This software is user-supported software and may be freely copied and used by 
  14. anyone who wishes to do so as long as the following conditions are met: 
  15.  
  16.   1. These functions may not be used by any program for which a fee is charged 
  17.      unless the owner of the program has paid the registration fee. 
  18.  
  19.   2. If you transmit a copy of this software to another party you must give 
  20.      them the complete unaltered contents of the REXXUTIL.ZIP file. 
  21.  
  22.   3. If you make any modifications to these functions you must change the name 
  23.      of the dynamic link library file REXXUTIL.DLL to some other name. 
  24.  
  25.  If you feel that this program has benefited you, please register it by sending 
  26.  $25.00 to: 
  27.  
  28.  W. David Ashley 
  29.  5 Timberline Dr. 
  30.  Trophy Club, Tx 76262 
  31.  
  32.  The source code for REXXUTIL can be obtained by sending $75.00 ($25.00 
  33.  registration + $50.00 source code) to the same address. 
  34.  
  35.  If you have questions, comments or suggestions please contact me through the 
  36.  OS/2 Shareware BBS or at the address above. 
  37.  
  38.  DESCRIPTION 
  39.  
  40.  REXXUTIL is a Dynamic Link Library (DLL) which provides the OS/2 REXX 
  41.  programmer with many versatile functions. 
  42.  
  43.  REXXUTIL was created so that many REXX/2 cmds could be optimized. Prior to 
  44.  REXXUTIL, my cmds were forced to shell out to OS/2 and run an executable or 
  45.  internal command.  This was very slow and often caused many lines of code to 
  46.  be written. 
  47.  
  48.  The functions which REXXUTIL provides are: 
  49.  
  50.  o RexCls 
  51.  o RexCopy 
  52.  o RexDelete 
  53.  o RexDir 
  54.  o RexDirExist 
  55.  o RexFileExist 
  56.  o RexFileLength 
  57.  o RexGetKey 
  58.  o RexGetVer 
  59.  o RexMacroDrop 
  60.  o RexMacroErase 
  61.  o RexMacroLibDir 
  62.  o RexMacroLoad 
  63.  o RexMacroQuery 
  64.  o RexMacroReOrder 
  65.  o RexMacroSave 
  66.  o RexPause 
  67.  o RexQCurDisk 
  68.  o RexRead 
  69.  o RexRenameFile 
  70.  o RexRun 
  71.  o RexSay 
  72.  o RexSearchPath 
  73.  o RexSem 
  74.  o RexSetCurPos 
  75.  o RexSleep 
  76.  o RexStrToLONG 
  77.  o RexStrToSHORT 
  78.  o RexSubcomQuery 
  79.  o RexUtilVersion 
  80.  o RexWrite 
  81.  
  82.  BEFORE YOU BEGIN 
  83.  
  84.  Before you begin to use this reference, it would be helpful to understand how 
  85.  you can: 
  86.  
  87.  o Expand the Contents window to see all available topics 
  88.  o Obtain additional information for a highlighted word or phrase 
  89.  o Use action bar choices. 
  90.  
  91.  HOW TO USE THE CONTENTS 
  92.  
  93.  When the Contents window is first displayed, some topics have a plus  (+) sign 
  94.  beside them.  The plus sign indicates that additional topics are available. 
  95.  
  96.  To expand the Contents window if you are using a mouse, click on the plus 
  97.  sign. If you are using the keyboard, use the Up Arrow () or Down Arrow () 
  98.  key to highlight the topic and press the Plus (+) key.  For example, 
  99.  Introduction has a plus sign beside it. To see the complete list of topics, 
  100.  click on the plus sign or highlight that topic and press the Plus key. 
  101.  
  102.  To view a topic, double-click on the topic (or press the Up Arrow or Down 
  103.  Arrow key to highlight the topic and then press the Enter key). 
  104.  
  105.  HOW TO OBTAIN ADDITIONAL INFORMATION 
  106.  
  107.  After you select a topic, the information for that topic is displayed in a 
  108.  window.  Highlighted words or phrases indicate that additional information is 
  109.  available. You will notice that certain words in the following section are 
  110.  highlighted. If you are using a mouse, double-click on the highlighted word. 
  111.  If you are using a keyboard, press the Tab key to move to the highlighted word 
  112.  and then press the Enter key. Additional information will be displayed in a 
  113.  pop-up window. 
  114.  
  115.  HOW TO USE ACTION BAR CHOICES 
  116.  
  117.  A number of choices are available for managing information presented in the 
  118.  OS/2 LAN Command Reference. If you want to see more information about these 
  119.  choices, double-click on the name of the choice (or press the Tab key to move 
  120.  to the choice and press the Enter key). 
  121.  
  122.  Bookmark    Allows you to set a placeholder so you can retrieve information of 
  123.              interest to you. (This choice is available from the Services 
  124.              pull-down.) 
  125.  
  126.  Search      Allows you to find occurrences of a word or phrase in the current 
  127.              topic, selected topics, or all topics.  (This choice is available 
  128.              from the Services pull-down.) 
  129.  
  130.  Print       Allows you to print one or more topics. (This choice is available 
  131.              from the Services pull-down.) 
  132.  
  133.  Copy        Allows you to copy a topic you are viewing to a file you can edit. 
  134.              (This choice is available from the Services pull-down.) 
  135.  
  136.  Options     Allows you to change the way your Contents window is displayed. 
  137.  
  138.  TRADEMARKS 
  139.  
  140.  The following trademarks apply to this reference: 
  141.  
  142.  o IBM is a registered trademark of International Business Machines 
  143.    Corporation. 
  144.  
  145.  o Operating System/2 and OS/2 are trademarks of International Business 
  146.    Machines Corporation. 
  147.  
  148.  o Personal System/2 and PS/2 are trademarks of International Business Machines 
  149.    Corporation. 
  150.  
  151.  o REXX/2 is a trademark of International Business Machines Corporation. 
  152.  
  153.  
  154. ΓòÉΓòÉΓòÉ 1.1. Requirements ΓòÉΓòÉΓòÉ
  155.  
  156. REXXUTIL requires that you are already running under one of the following 
  157. environments: 
  158.  
  159.  o OS/2 1.3 SE 
  160.  
  161.  o OS/2 EE 1.2 or 1.3 
  162.  
  163.  REXXUTIL has been tested on all of the above versions of OS/2. 
  164.  
  165.  
  166. ΓòÉΓòÉΓòÉ 1.2. Installation ΓòÉΓòÉΓòÉ
  167.  
  168. Copy the REXXUTIL.DLL file to a directory specified in your LIBPATH. 
  169.  
  170. Note:  If you have a previous copy of REXXUTIL loaded and OS/2 cannot 
  171. open/replace the file then a copy of the DLL currently resides in memory. 
  172. Reboot and before executing any REXX/2 cmds that reference REXXUTIL copy the 
  173. file to your LIBPATH destination. 
  174.  
  175.  
  176. ΓòÉΓòÉΓòÉ 1.3. Usage ΓòÉΓòÉΓòÉ
  177.  
  178. REXXUTIL is an external function package. To be able to use a REXXUTIL function 
  179. in a REXX/2 cmd, you must first register the function via the command 
  180. RxFuncAdd. 
  181.  
  182. call RxFuncAdd 'RexCls', 'REXXUTIL', 'RexCls'
  183.  
  184. The above example would add the RexCls function so that it can be used. The 
  185. first argument specifies how you wish to refer to the function in you program 
  186. (its name in the program). The second argument references the name of the 
  187. REXXUTIL.DLL library (always 'REXXUTIL'). And the third argument references the 
  188. name of the entry point in the library which contains the code for the function 
  189. (the name always referenced in this manual when refering to a REXXUTIL 
  190. function). 
  191.  
  192. To drop the function when the application is done execute the following: 
  193.  
  194. call RxFuncDrop 'RexCls'
  195.  
  196. The function name now becomes unknown to the REXX/2 interpreter and will 
  197. generate a runtime error if used after this point in the program. 
  198.  
  199. Refer to IBM Operating System/2 Procedures Language 2/REXX Reference manual for 
  200. more information on the RxFuncAdd and RxFuncDrop statements. 
  201.  
  202. Note:  The case of the strings passed to RxFuncAdd and RxFuncDrop are not 
  203. important. The strings will be converted to all upper case by the REXX/2 
  204. interpreter automatically. 
  205.  
  206.  
  207. ΓòÉΓòÉΓòÉ 2. How to Read the Syntax Diagrams ΓòÉΓòÉΓòÉ
  208.  
  209. The syntax diagram shows you how to specify a function so that REXX/2 can 
  210. correctly interpret what you type. Read the syntax diagram from left to right 
  211. and from top to bottom, starting at the ΓöÇ symbol, following the horizontal 
  212. line (the main path). A line ending with an ΓöÇ means that the command syntax is 
  213. continued.  A line starting with an ΓöÇ means that the syntax is continued from 
  214. the previous line. The ΓöÇ symbol marks the end of the function syntax. 
  215. Required parameters are displayed on the main path; optional parameters are 
  216. displayed below it. 
  217.  
  218. Parameters are classified as constants or variables. String constants must be 
  219. delimited by the standard REXX/2 quotation marks. A function name is a keyword. 
  220. REXX/2 functions may be either CALLed or referenced as a function entry. Some 
  221. of the external functions presented here do not return any values. 
  222.  
  223. Variables appear in lowercase letters and represet names or values you supply. 
  224. Include all punctuation shown in the diagram, such as colons, semicolons, 
  225. commas, quotation marks, and equal signs. 
  226.  
  227. Optional Parameters: Optional parameter appear below the main syntax trace 
  228. line. If specified they must appear in the order listed. 
  229.  
  230.  
  231.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexDir filespec, stemΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
  232.                                        ΓööΓöÇΓöÇ, optionsΓöÇΓöÇΓöÿ    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  233.  
  234.  
  235. ΓòÉΓòÉΓòÉ 3. Function Overview ΓòÉΓòÉΓòÉ
  236.  
  237. The descriptions of all functions in the REXXUTIL package follow. They are 
  238. listed in alphabetical order. 
  239.  
  240.  
  241. ΓòÉΓòÉΓòÉ 3.1. RexCls ΓòÉΓòÉΓòÉ
  242.  
  243.  
  244. NEXT 
  245.  
  246. Syntax: 
  247.  
  248.  
  249.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexClsΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  250.                         ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  251.  
  252.  or
  253.  
  254.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexCls()ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  255.                                    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  256.  
  257. Purpose: 
  258.  
  259. Clears the screen quickly and sets the cursor to the top left corner of the 
  260. screen (0,0). 
  261.  
  262. Note:  This function uses VioScrollUp() and VioSetCurPos(). 
  263.  
  264. Arguments: 
  265.  
  266. None. 
  267.  
  268. Returns: 
  269.  
  270. Always returns '' (null string). 
  271.  
  272. Example: 
  273.  
  274. /* clear screen, ignore return code */
  275. call RexCls
  276.  
  277.  
  278. NEXT 
  279.  
  280.  
  281. ΓòÉΓòÉΓòÉ 3.2. RexCopy ΓòÉΓòÉΓòÉ
  282.  
  283.  
  284. PREV NEXT 
  285.  
  286. Syntax: 
  287.  
  288.  
  289.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexCopy srcfilespec, destfilespecΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  290.  
  291.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  292.          ΓööΓöÇΓöÇ, optionΓöÇΓöÇΓöÿ    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  293.  
  294.  or
  295.  
  296.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexCopy(srcfilespec, destfilespecΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  297.  
  298.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  299.          ΓööΓöÇΓöÇ, optionΓöÇΓöÇΓöÿ         ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  300.  
  301. Purpose: 
  302.  
  303. File copy by operating system. All extended attributes are copied as well as 
  304. the file contents. 
  305.  
  306. Arguments: 
  307.  
  308.  srcfilespec         Source file specification which could include wildcards. 
  309.                      The parameter is NOT case sensitive. 
  310.  
  311.  destfilespec        Destination file specification which could include 
  312.                      wildcards. The parameter is NOT case sensitive. 
  313.  
  314.  option              Copy option. 
  315.  
  316.     'APPEND'     Append source file(s) to the end of the specified destination 
  317.                  file(s) if they exist or to create them if they do not. If 
  318.                  this option is not present the default is to create/replace 
  319.                  the destination file(s). 
  320.  
  321.                  The parameter is NOT case sensitive. 
  322.  
  323.  Returns: 
  324.  
  325.  ''        Invalid number of arguments. 
  326.  
  327.  '2'       File not found. 
  328.  
  329.  '3'       Path not found. 
  330.  
  331.  '5'       Access denied. 
  332.  
  333.  '26'      Not a DOS disk. 
  334.  
  335.  '32'      Sharing violation. 
  336.  
  337.  '36'      Sharing buffer exceeded. 
  338.  
  339.  '87'      Invalid parameter. 
  340.  
  341.  '108'     Drive locked. 
  342.  
  343.  '112'     Insufficient disk space. 
  344.  
  345.  '206'     File name length error. 
  346.  
  347.  '266'     Copy not possible. 
  348.  
  349.  '267'     Bad directory specification. 
  350.  
  351.  '-1'      Invalid option or argument. 
  352.  
  353.  Example: 
  354.  
  355.   /* copy all files from c:\temp to c:\work */
  356.   dest = 'c:\work'
  357.   return_code = RexCopy('c:\temp\*.*', dest)
  358.  
  359.  
  360.  PREV NEXT 
  361.  
  362.  
  363. ΓòÉΓòÉΓòÉ 3.3. RexDelete ΓòÉΓòÉΓòÉ
  364.  
  365.  
  366. PREV NEXT 
  367.  
  368. Syntax: 
  369.  
  370.  
  371.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexDelete filespecΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  372.                                     ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  373.  
  374.  or
  375.  
  376.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexDelete(filespec)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  377.                                               ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  378.  
  379. Purpose: 
  380.  
  381. Deletes the specified file. 
  382.  
  383. Arguments: 
  384.  
  385.  filespec  File specification to be deleted. Wildcard characters are NOT 
  386.            allowed. The parameter is NOT case sensitive. 
  387.  
  388.  Returns: 
  389.  
  390.  ''        Invalid number of arguments. 
  391.  
  392.  '2'       File not found. 
  393.  
  394.  '3'       Path not found. 
  395.  
  396.  '5'       Access denied. 
  397.  
  398.  '26'      Not a DOS disk. 
  399.  
  400.  '32'      Sharing violation. 
  401.  
  402.  '36'      Sharing buffer exceeded. 
  403.  
  404.  Example: 
  405.  
  406.   /* delete the file c:\source\test.txt */
  407.   call RexDelete 'c:\source\test.txt'
  408.  
  409.  
  410.  PREV NEXT 
  411.  
  412.  
  413. ΓòÉΓòÉΓòÉ 3.4. RexDir ΓòÉΓòÉΓòÉ
  414.  
  415.  
  416. PREV NEXT 
  417.  
  418. Syntax: 
  419.  
  420.  
  421.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexDir filespec, stemΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
  422.                                        ΓööΓöÇΓöÇ, optionsΓöÇΓöÇΓöÿ    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  423.  
  424.  or
  425.  
  426.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexDir(filespec, stemΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  427.  
  428.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  429.          ΓööΓöÇΓöÇ, optionsΓöÇΓöÇΓöÿ         ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  430.  
  431. Purpose: 
  432.  
  433. Finds all files which are equal to the specified filespec, and places their 
  434. descriptions (date time size attr filespec) in a stem variable. 
  435.  
  436. Arguments: 
  437.  
  438.  filespec       The filespec (possibly including wildcards) to obtain a 
  439.                 directory listing of. The parameter is NOT case sensitive. 
  440.  
  441.  stem           The name of the stem variable to place the results. 
  442.  
  443.                 Note:  stem.0 contains the number of files and/or directories 
  444.                 found. 
  445.  
  446.  options        Any logical combination of the following: 
  447.  
  448.     'F'  Search for files only. (default). 
  449.     'D'  Search for directories only. 
  450.     'B'  Search for both files and directories. 
  451.     'S'  Scan for System files. 
  452.     'H'  Scan for Hidden files. 
  453.  
  454.          The parameter is NOT case sensitive. 
  455.  
  456.  Returns: 
  457.  
  458.  ''        Invalid number of arguments. 
  459.  
  460.  '0'       Successful. 
  461.  
  462.            Note:  stem.0 is valid only on this return code. 
  463.  
  464.  '1'       Bad return code from REXX/2 Variable pool interface. 
  465.  
  466.  '2'       Not enough memory. 
  467.  
  468.  Example: 
  469.  
  470.   /* Find all files and subdirectories in C:\ (hidden and system)     */
  471.   myrc = RexDir('c:\*.*', 'file', 'BSH')
  472.   /* if myrc = 0 then file.0 contains the number of directory entries */
  473.   /* and file.1 thru file.n contain the directory entries             */
  474.  
  475.  
  476.  PREV NEXT 
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ 3.5. RexDirExist ΓòÉΓòÉΓòÉ
  480.  
  481.  
  482. PREV NEXT 
  483.  
  484. Syntax: 
  485.  
  486.  
  487.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexDirExist(directory)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  488.                                                  ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  489.  
  490. Purpose: 
  491.  
  492. Tells whether or not the specified directory exists. 
  493.  
  494. Arguments: 
  495.  
  496.  directory Name of a directory of interest. The parameter is NOT case 
  497.            sensitive. 
  498.  
  499.  Returns: 
  500.  
  501.  ''        Invalid number of arguments, 
  502.  
  503.  '0'       Directory does not exist. 
  504.  
  505.  '1'       Directory exists. 
  506.  
  507.  Example: 
  508.  
  509.   /* check to see if the d: drive has the directory \apps */
  510.   exist = RexDirExist('d:\apps')
  511.   /* check return code and call subroutines */
  512.   if exist then call does_exist
  513.   else call does_not_exist
  514.  
  515.  
  516.  PREV NEXT 
  517.  
  518.  
  519. ΓòÉΓòÉΓòÉ 3.6. RexFileExist ΓòÉΓòÉΓòÉ
  520.  
  521.  
  522. PREV NEXT 
  523.  
  524. Syntax: 
  525.  
  526.  
  527.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexFileExist(filename)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  528.                                                  ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  529.  
  530. Purpose: 
  531.  
  532. Tells whether or not the specified file exists. 
  533.  
  534. Arguments: 
  535.  
  536.  filename  Name of a file of interest. The parameter is NOT case sensitive. 
  537.  
  538.  Returns: 
  539.  
  540.  ''        Invalid number of arguments. 
  541.  
  542.  '0'       File does not exist. 
  543.  
  544.  '1'       File exists. 
  545.  
  546.  Example: 
  547.  
  548.   /* check to see if the d: drive has the file \apps\work.txt */
  549.   exist = RexFileExist('d:\apps\work.txt')
  550.   /* check return code and call subroutines */
  551.   if exist then call does_exist
  552.   else call does_not_exist
  553.  
  554.  
  555.  PREV NEXT 
  556.  
  557.  
  558. ΓòÉΓòÉΓòÉ 3.7. RexFileLength ΓòÉΓòÉΓòÉ
  559.  
  560.  
  561. PREV NEXT 
  562.  
  563. Syntax: 
  564.  
  565.  
  566.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexFileLength(filename)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  567.                                                   ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  568.  
  569. Purpose: 
  570.  
  571. Returns the length of the specified file in bytes. 
  572.  
  573. Arguments: 
  574.  
  575.  filename  Name of a file of interest. The parameter is NOT case sensitive. 
  576.  
  577.  Returns: 
  578.  
  579.  ''        Invalid number of arguments. 
  580.  
  581.  '-1'      File does not exist or other error. 
  582.  
  583.  >='0'     File length in bytes. 
  584.  
  585.  Example: 
  586.  
  587.   /* check length of file \apps\work.txt */
  588.   filelength = RexFileLength('d:\apps\work.txt')
  589.   /* check return code and call subroutines */
  590.   if filelength = -1 then call error_routine
  591.   else say filelength
  592.  
  593.  
  594.  PREV NEXT 
  595.  
  596.  
  597. ΓòÉΓòÉΓòÉ 3.8. RexGetKey ΓòÉΓòÉΓòÉ
  598.  
  599.  
  600. PREV NEXT 
  601.  
  602. Syntax: 
  603.  
  604.  
  605.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇkey = RexGetKey(ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  606.                            ΓööΓöÇΓöÇoptionΓöÇΓöÇΓöÿ       ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  607.  
  608. Purpose: 
  609.  
  610. Gets the next key from the keyboard buffer, or waits for one if none exist. 
  611. Works like the C function getch() or getche(). 
  612.  
  613. Arguments: 
  614.  
  615.  option    Any one of the following: 
  616.  
  617.     'ECHO'         Echo the typed character (Default) 
  618.     'NOECHO'       Do not echo the typed character 
  619.  
  620.                    The parameter is NOT case sensitive. 
  621.  
  622.  Returns: 
  623.  
  624.  key       The key which was pressed. 
  625.  
  626.  ''        Invalid number of arguments. 
  627.  
  628.  Example: 
  629.  
  630.   /* get the password, do not echo password */
  631.   password = ''
  632.   key = RexGetKey('NOECHO')
  633.   do while c2d(key) \= 13
  634.      password = password || key
  635.      key = RexGetKey('NOECHO')
  636.      end
  637.  
  638.  
  639.  PREV NEXT 
  640.  
  641.  
  642. ΓòÉΓòÉΓòÉ 3.9. RexGetVer ΓòÉΓòÉΓòÉ
  643.  
  644.  
  645. PREV NEXT 
  646.  
  647. Syntax: 
  648.  
  649.  
  650.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇver = RexGetVer()ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  651.                               ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  652.  
  653. Purpose: 
  654.  
  655. Returns the OS/2 version information. 
  656.  
  657. Arguments: 
  658.  
  659. None. 
  660.  
  661. Returns: 
  662.  
  663.  ver       String containing OS/2 version info in the form 'x.xx'. 
  664.  
  665.  ''        Invalid number of arguments. 
  666.  
  667.  Example: 
  668.  
  669.   /* get the OS/2 version */
  670.   version = RexGetVer()
  671.  
  672.  
  673.  PREV NEXT 
  674.  
  675.  
  676. ΓòÉΓòÉΓòÉ 3.10. RexMacroDrop ΓòÉΓòÉΓòÉ
  677.  
  678.  
  679. PREV NEXT 
  680.  
  681. Syntax: 
  682.  
  683.  
  684.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroDrop(funcname)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  685.                                           ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  686.  
  687. Purpose: 
  688.  
  689. Drops the specified function from the REXX/2 Macrospace. 
  690.  
  691. Arguments: 
  692.  
  693.  funcname       Name of the Macrospace function to drop. 
  694.  
  695.  Returns: 
  696.  
  697.  0         Function successfully dropped from the Macrospace. 
  698.  
  699.  2         Function not found in the Macrospace. 
  700.  
  701.  ''        Invalid number of arguments. 
  702.  
  703.  Example: 
  704.  
  705.   /* drop the function 'TestIt' from the REXX/2 Macrospace */
  706.   retc = RexMacroDrop('testit')
  707.  
  708.  
  709.  PREV NEXT 
  710.  
  711.  
  712. ΓòÉΓòÉΓòÉ 3.11. RexMacroErase ΓòÉΓòÉΓòÉ
  713.  
  714.  
  715. PREV NEXT 
  716.  
  717. Syntax: 
  718.  
  719.  
  720.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroErase(funcname)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  721.                                            ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  722.  
  723. Purpose: 
  724.  
  725. Drops all functions unconditionally from the REXX/2 Macrospace. 
  726.  
  727. Note:  Be very careful in the use of this function. The REXX/2 Macrospace is 
  728. global to all threads, tasks, and screen groups in OS/2. Functions will be 
  729. dropped even though other tasks may be currently using them. 
  730.  
  731. Arguments: 
  732.  
  733. None. 
  734.  
  735. Returns: 
  736.  
  737.  0         Macrospace successfully cleared. 
  738.  
  739.  2         Macrospace is currently empty. 
  740.  
  741.  ''        Invalid number of arguments. 
  742.  
  743.  Example: 
  744.  
  745.   /* erase all functions from the Macrospace */
  746.   retc = RexMacroErase()
  747.  
  748.  
  749.  PREV NEXT 
  750.  
  751.  
  752. ΓòÉΓòÉΓòÉ 3.12. RexMacroLibDir ΓòÉΓòÉΓòÉ
  753.  
  754.  
  755. PREV NEXT 
  756.  
  757. Syntax: 
  758.  
  759.  
  760.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroLibDir(filename, stem)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  761.                                                   ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  762.  
  763. Purpose: 
  764.  
  765. Reads the Function Directory of a REXX/2 Macro Library file into a stem 
  766. variable. 
  767.  
  768. Arguments: 
  769.  
  770.  filename       The name of the REXX/2 Macro Library file. The parameter is NOT 
  771.                 case sensitive. 
  772.  
  773.  stem           The name of the stem variable to place the function directory. 
  774.                 The format of each function directory entry is 
  775.  
  776.      1. Function size in bytes - 8 characters 
  777.      2. 1 blank character 
  778.      3. Function search position - 6 characters 
  779.      4. 1 blank character 
  780.      5. Function name - up to 255 characters 
  781.  
  782.  Note:  stem.0 will contain the number of function entries in the library on a 
  783.  successful return from RexMacroLibDir. 
  784.  
  785.  Returns: 
  786.  
  787.  ''        Invalid number of arguments. 
  788.  
  789.  '0'       File read was successful. 
  790.  
  791.            Note:  stem.0 is valid only on this return code. 
  792.  
  793.  '1'       Error opening file. 
  794.  
  795.  '2'       Not enough memory. 
  796.  
  797.  '5'       Invalid call to REXX/2 Variable pool interface. 
  798.  
  799.  Example: 
  800.  
  801.   retc = RexMacroLibDir('mylib.rxl', 'func')
  802.   if retc = 0 then do
  803.      say 'The number of function entries is' func.0'.'
  804.      say 'The function directory follows:'
  805.      do num = 1 to func.0
  806.         say func.num
  807.         end
  808.      end
  809.   else say 'Invalid return code. Return code =' retc
  810.  
  811.  
  812.  PREV NEXT 
  813.  
  814.  
  815. ΓòÉΓòÉΓòÉ 3.13. RexMacroLoad ΓòÉΓòÉΓòÉ
  816.  
  817.  
  818. PREV NEXT 
  819.  
  820. Syntax: 
  821.  
  822.  
  823.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroLoad(filename)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  824.                                           ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  825.  
  826.  or
  827.  
  828.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroLoad(filename, fname, srch)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  829.                                                        ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  830.  
  831. Purpose: 
  832.  
  833. Loads either a REXX/2 Macro Library or a REXX/2 Function to the REXX/2 
  834. Macrospace. The 1 argument version loads all functions from a REXX/2 Macrospace 
  835. Library and the 3 argument version loads a REXX/2 command file as a function. 
  836.  
  837. Arguments: 
  838.  
  839.  filename       REXX/2 Macro Library or REXX/2 function file name. The 
  840.                 parameter is NOT case sensitive. 
  841.  
  842.  fname          Function name to give to the Macrospace function. 
  843.  
  844.  srch           Either of the following literal strings to specify the search 
  845.                 order position of the function: 
  846.  
  847.     'BEFORE'       Load function at beginning of Macrospace search list. 
  848.  
  849.     'AFTER'        Load function at end of Macrospace search list. 
  850.  
  851.                    The parameter is NOT case sensitive. 
  852.  
  853.  Returns: 
  854.  
  855.  0         Function(s) successfully loaded. 
  856.  
  857.  1         No memory storage available or memory error. 
  858.  
  859.  2         Macro function not found. 
  860.  
  861.  4         Macro function already exists in Macrospace. None of the specified 
  862.            functions have been loaded. 
  863.  
  864.  5         Macro file error. 
  865.  
  866.  6         Macro library file signature error. 
  867.  
  868.  7         Macro function source file not found. 
  869.  
  870.  8         Invalid search position specified. 
  871.  
  872.  ''        Invalid number of arguments. 
  873.  
  874.  Example: 
  875.  
  876.   /* load all functions from a REXX/2 Macro Function */
  877.   /* Library file into the Macrospace              */
  878.   retc = RexMacroLoad('macrolib.rxl')
  879.  
  880.   /* load a single REXX/2 function file into the Macrospace */
  881.   retc = RexMacroLoad('func.cmd', 'myfunc', 'BEFORE')
  882.  
  883.  
  884.  PREV NEXT 
  885.  
  886.  
  887. ΓòÉΓòÉΓòÉ 3.14. RexMacroQuery ΓòÉΓòÉΓòÉ
  888.  
  889.  
  890. PREV NEXT 
  891.  
  892. Syntax: 
  893.  
  894.  
  895.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroQuery(funcname)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  896.                                            ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  897.  
  898. Purpose: 
  899.  
  900. Queries the REXX/2 Macrospace for the existence of a function. 
  901.  
  902. Arguments: 
  903.  
  904.  funcname       Function name in the Macrospace to be searched for. 
  905.  
  906.  Returns: 
  907.  
  908.  0         Function not found. 
  909.  
  910.  1         Function found. Search order for the function is 'BEFORE'. 
  911.  
  912.  2         Function found. Search order for the function is 'AFTER'. 
  913.  
  914.  ''        Invalid number of arguments. 
  915.  
  916.  Example: 
  917.  
  918.   /* query Macrospace for function 'myfunc' */
  919.   retc = RexMacroQuery('myfunc')
  920.  
  921.  
  922.  PREV NEXT 
  923.  
  924.  
  925. ΓòÉΓòÉΓòÉ 3.15. RexMacroReOrder ΓòÉΓòÉΓòÉ
  926.  
  927.  
  928. PREV NEXT 
  929.  
  930. Syntax: 
  931.  
  932.  
  933.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroReOrder(fname, srch)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  934.                                                 ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  935.  
  936. Purpose: 
  937.  
  938. Adjusts the search order position of the specified function in the REXX/2 
  939. Macrospace. 
  940.  
  941. Arguments: 
  942.  
  943.  fname          Function name in the Macrospace to be altered. 
  944.  
  945.  srch           Either of the following literal strings to specify the search 
  946.                 order position of the function: 
  947.  
  948.     'BEFORE'       Set function at beginning of Macrospace search list. 
  949.  
  950.     'AFTER'        Set function at end of Macrospace search list. 
  951.  
  952.                    The parameter is NOT case sensitive. 
  953.  
  954.  Returns: 
  955.  
  956.  0         Function search option successfully altered. 
  957.  
  958.  2         Function not found. 
  959.  
  960.  8         Invalid search option specified. 
  961.  
  962.  ''        Invalid number of arguments. 
  963.  
  964.  Example: 
  965.  
  966.   /* adjust search position of function 'myfunc' */
  967.   retc = RexMacroReOrder('myfunc', 'AFTER')
  968.  
  969.  
  970.  PREV NEXT 
  971.  
  972.  
  973. ΓòÉΓòÉΓòÉ 3.16. RexMacroSave ΓòÉΓòÉΓòÉ
  974.  
  975.  
  976. PREV NEXT 
  977.  
  978. Syntax: 
  979.  
  980.  
  981.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexMacroSave(filename)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  982.                                           ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  983.  
  984. Purpose: 
  985.  
  986. Saves the entire REXX/2 Macrospace to the specified filename. 
  987.  
  988. Arguments: 
  989.  
  990.  filename       Name of the file in which to save the Macrospace. The parameter 
  991.                 is NOT case sensitive. 
  992.  
  993.  Returns: 
  994.  
  995.  0         Function saved in the specified file. 
  996.  
  997.  2         REXX/2 Macrospace is empty, no functions loaded or saved. 
  998.  
  999.  3         An extension is required on the specified filename. 
  1000.  
  1001.  5         File error. 
  1002.  
  1003.  ''        Invalid number of arguments. 
  1004.  
  1005.  Example: 
  1006.  
  1007.   /* save all functions in the Macrospace to the file 'myfuncs.rxl' */
  1008.   retc = RexMacroSave('myfuncs.rxl')
  1009.  
  1010.  
  1011.  PREV NEXT 
  1012.  
  1013.  
  1014. ΓòÉΓòÉΓòÉ 3.17. RexPause ΓòÉΓòÉΓòÉ
  1015.  
  1016.  
  1017. PREV NEXT 
  1018.  
  1019. Syntax: 
  1020.  
  1021.  
  1022.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexPauseΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1023.                           ΓööΓöÇΓöÇpromptΓöÇΓöÇΓöÿ    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1024.  
  1025. Purpose: 
  1026.  
  1027. Similar to OS/2 PAUSE. Waits for the user to press a key before continuing. 
  1028. Also allows for optional prompt. 
  1029.  
  1030. Note:  This function uses VioWrtTTY(). 
  1031.  
  1032. Arguments: 
  1033.  
  1034.  prompt    The message to give the user. The default message is "Press any key 
  1035.            when ready..." 
  1036.  
  1037.  Returns: 
  1038.  
  1039.  Always returns '' (null string). 
  1040.  
  1041.  Example: 
  1042.  
  1043.   /* send prompt to user and wait for response*/
  1044.   call RexPause 'Press any key to continue'
  1045.  
  1046.  
  1047.  PREV NEXT 
  1048.  
  1049.  
  1050. ΓòÉΓòÉΓòÉ 3.18. RexQCurDisk ΓòÉΓòÉΓòÉ
  1051.  
  1052.  
  1053. PREV NEXT 
  1054.  
  1055. Syntax: 
  1056.  
  1057.  
  1058.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇmap = RexQCurDisk()ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1059.                                 ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1060.  
  1061. Purpose: 
  1062.  
  1063. Reports all accessible drives in in the form 'ABC...' 
  1064.  
  1065. Arguments: 
  1066.  
  1067. None. 
  1068.  
  1069. Returns: 
  1070.  
  1071.  map       A string containing all accessible drive letters. 
  1072.  
  1073.  ''        Invalid number of arguments. 
  1074.  
  1075.  Example: 
  1076.  
  1077.   /* get all accessible drive letters */
  1078.   drives = RexQCurDisk()
  1079.  
  1080.  
  1081.  PREV NEXT 
  1082.  
  1083.  
  1084. ΓòÉΓòÉΓòÉ 3.19. RexRead ΓòÉΓòÉΓòÉ
  1085.  
  1086.  
  1087. PREV NEXT 
  1088.  
  1089. Syntax: 
  1090.  
  1091.  
  1092.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexRead filename, stemΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1093.                                         ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1094.  
  1095.  or
  1096.  
  1097.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇreturn_code = RexRead(filename, stem)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1098.                                                   ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1099.  
  1100. Purpose: 
  1101.  
  1102. Reads a specified file into a stem variable. The maximum input line is 
  1103. restricted to 255 characters. If the input line is longer than 255 characters 
  1104. then it will be split physically as many times as necessary into successive 
  1105. stem variables. 
  1106.  
  1107. Arguments: 
  1108.  
  1109.  filename       The name of the file to read. The parameter is NOT case 
  1110.                 sensitive. 
  1111.  
  1112.  stem           The name of the stem to place the file in. 
  1113.  
  1114.                 Note:  stem.0 contains the number of lines read. 
  1115.  
  1116.  Returns: 
  1117.  
  1118.  ''        Invalid number of arguments. 
  1119.  
  1120.  '0'       File read was successful. 
  1121.  
  1122.            Note:  stem.0 is valid only on this return code. 
  1123.  
  1124.  '1'       Error opening file. 
  1125.  
  1126.  '2'       Not enough memory. 
  1127.  
  1128.  '5'       Invalid call to REXX/2 Variable pool interface. 
  1129.  
  1130.  Example: 
  1131.  
  1132.   call RexRead 'c:\config.sys', 'file'
  1133.   say 'The number of lines in the file is' file.0'.'
  1134.   say 'The listing of the file follows:'
  1135.   do num = 1 to file.0
  1136.      say file.num
  1137.      end
  1138.  
  1139.  
  1140.  PREV NEXT 
  1141.  
  1142.  
  1143. ΓòÉΓòÉΓòÉ 3.20. RexRenameFile ΓòÉΓòÉΓòÉ
  1144.  
  1145.  
  1146. PREV NEXT 
  1147.  
  1148. Syntax: 
  1149.  
  1150.  
  1151.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexRenameFile oldfilename, newfilenameΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇ
  1152.                                                         ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1153.  
  1154.  or
  1155.  
  1156.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexRenameFile(oldfilename, newfilename)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ
  1157.                                                            ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1158.  
  1159. Purpose: 
  1160.  
  1161. Rename a specified file or directory. 
  1162.  
  1163. Arguments: 
  1164.  
  1165.  oldfilename         The name of the file or directory to rename. The parameter 
  1166.                      is NOT case sensitive. 
  1167.  
  1168.  newfilename         The new name of the file or directory. The parameter is 
  1169.                      NOT case sensitive. 
  1170.  
  1171.  Returns: 
  1172.  
  1173.  ''        Invalid number of arguments. 
  1174.  
  1175.  '0'       File rename was successful. 
  1176.  
  1177.  '2'       Source file or path not found. 
  1178.  
  1179.  '13'      File or directory already exists, could not be created or invalid 
  1180.            path specification. 
  1181.  
  1182.  '18'      Attempt to move a file to a different device. 
  1183.  
  1184.  Example: 
  1185.  
  1186.   call RexRename 'c:\config.sys', 'config.old'
  1187.  
  1188.  
  1189.  PREV NEXT 
  1190.  
  1191.  
  1192. ΓòÉΓòÉΓòÉ 3.21. RexRun ΓòÉΓòÉΓòÉ
  1193.  
  1194.  
  1195. PREV NEXT 
  1196.  
  1197. Syntax: 
  1198.  
  1199.  
  1200.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexRun(command)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1201.                                    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1202.  
  1203. Purpose: 
  1204.  
  1205. Executes a specified OS/2 command and and retains the return code. 
  1206.  
  1207. Note:  This is very because: 
  1208.  
  1209.  o The chaining of REXX/2 cmd files is not allowed therefore REXX/2 cmd files 
  1210.    should be started via the OS/2 call command or as an external procedure via 
  1211.    the REXX/2 call statement. 
  1212.  
  1213.  o If using the OS/2 call command to run a REXX/2 cmd file, the return code of 
  1214.    said cmd file is lost. 
  1215.  
  1216.  o The REXX/2 call statement will retain the return code, but it will not 
  1217.    interpret the REXX/2 cmd to be run if it is specified in any part by a 
  1218.    variable. To do this you would be forced to interpret the call statement. 
  1219.  
  1220.  o RexRun overcomes all of the above. 
  1221.  
  1222.  o RexRun passes the REXX/2 cmds parent environment to its child process. Any 
  1223.    changes made to the environment prior to RexRun execution will not be 
  1224.    visible to RexRun. REXX/2 cmds run via RexRun can change the environment, 
  1225.    but this change will not be in place when the cmd ends and RexRun returns. 
  1226.  
  1227.  Arguments: 
  1228.  
  1229.  command        The program file to be executed with optional path. The command 
  1230.                 should include any parameters the program needs. 
  1231.  
  1232.  Returns: 
  1233.  
  1234.  The return code of the executed command or '' (null string) if the number of 
  1235.  arguments were invalid. 
  1236.  
  1237.  Example: 
  1238.  
  1239.   Drive='C:'; myrc = RexRun(Drive'\os2\format 'Drive)
  1240.  
  1241.  
  1242.  PREV NEXT 
  1243.  
  1244.  
  1245. ΓòÉΓòÉΓòÉ 3.22. RexSay ΓòÉΓòÉΓòÉ
  1246.  
  1247.  
  1248. PREV NEXT 
  1249.  
  1250. Syntax: 
  1251.  
  1252.  
  1253.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexSay(string)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1254.                                   ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1255.  
  1256. call RexSay string
  1257.  
  1258. Purpose: 
  1259.  
  1260. RexSay works like the REXX/2 "say" command but does not produce a newline. 
  1261. Great for prompts. 
  1262.  
  1263. Note:  This function uses VioWrtTTY(). 
  1264.  
  1265. Arguments: 
  1266.  
  1267.  string    Anything you want to be printed to the screen. 
  1268.  
  1269.  Returns: 
  1270.  
  1271.  Always returns '' (null string). 
  1272.  
  1273.  Example: 
  1274.  
  1275.   call RexSay 'Enter password: '
  1276.  
  1277.  
  1278.  PREV NEXT 
  1279.  
  1280.  
  1281. ΓòÉΓòÉΓòÉ 3.23. RexSearchPath ΓòÉΓòÉΓòÉ
  1282.  
  1283.  
  1284. PREV NEXT 
  1285.  
  1286. Syntax: 
  1287.  
  1288.  
  1289.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇfilespec = RexSearchPath(path, filename)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1290.                                                      ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1291.  
  1292. Purpose: 
  1293.  
  1294. Searches the specified path for the specified file and returns the full 
  1295. filespec of the file if found. 
  1296.  
  1297. Arguments: 
  1298.  
  1299.  path           Any environment variable that resembles a path, or 'LIBPATH'. 
  1300.                 The parameter is NOT case sensitive. 
  1301.  
  1302.  filename       The file to search the path for. The parameter is NOT case 
  1303.                 sensitive. 
  1304.  
  1305.  Returns: 
  1306.  
  1307.  filespec       The complete filespec of the file found. 
  1308.  
  1309.  ''             filename was not located, or invalid number of arguments. 
  1310.  
  1311.  Example: 
  1312.  
  1313.   say 'Testing RexSearchPath by searching for CMD.EXE in PATH:'
  1314.   say 'Directory containing CMD.EXE is: 'RexSearchPath('PATH', 'cmd.exe')
  1315.  
  1316.  
  1317.  PREV NEXT 
  1318.  
  1319.  
  1320. ΓòÉΓòÉΓòÉ 3.24. RexSem ΓòÉΓòÉΓòÉ
  1321.  
  1322.  
  1323. PREV NEXT 
  1324.  
  1325. Syntax: 
  1326.  
  1327.  
  1328.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexSem(semname, actionΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇ
  1329.                                         ΓööΓöÇΓöÇ, msecsΓöÇΓöÇΓöÿ     ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1330.  
  1331. Purpose: 
  1332.  
  1333. RexSem provides an interface to using OS/2 system semaphores. Semaphores 
  1334. provide a convenient vehicle in which seperate processes may determine the 
  1335. states of one another. 
  1336.  
  1337. Arguments: 
  1338.  
  1339.  semname        The semaphore name to be worked with.  Semaphore names must 
  1340.                 start with '\SEM\'. The parameter is NOT case sensitive. 
  1341.  
  1342.  action         Any one of the following: 
  1343.  
  1344.     'CREATE'       Create the semaphore if it does not already exist. 
  1345.     'SET'          Set the semaphore if it can be set. 
  1346.     'CLEAR'        Clear the semaphore if it can be cleared. 
  1347.     'CLOSE'        Close the semaphore. 
  1348.     'WAIT'         Wait until the specified semaphore is cleared. When using 
  1349.                    WAIT, the third argument (msecs) specifies the timeout 
  1350.                    factor. 
  1351.  
  1352.                    The parameter is NOT case sensitive. 
  1353.  
  1354.  msecs          Any of the following: 
  1355.  
  1356.     -1   Wait indefinitly. 
  1357.     0    Do not wait, timeout immediatly. 
  1358.     >0   Wait specified time then timeout. 
  1359.  
  1360.  Returns: 
  1361.  
  1362.  >='0'     Return code form DosCreateSem(), DosSemSet(), DosSemClear(), 
  1363.            DosCloseSem() or DosSemWait(). Refer to your OS/2 technical 
  1364.            documentation for more information about possible return codes from 
  1365.            these functions. 
  1366.  
  1367.  ''        Invalid number of arguments. 
  1368.  
  1369.  Example: 
  1370.  
  1371.   say 'Return code of \SEM\RXTEST semaphore ''Create'' =' ,
  1372.   RexSem('\sem\rxtest', 'CREATE')
  1373.  
  1374.   say 'Return code of semaphore ''Set'' =' RexSem('\sem\rxtest', 'SET')
  1375.  
  1376.   say 'Return code of ''Wait for semaphore clear'' =' ,
  1377.   RexSem('\sem\rxtest', 'WAIT', '1000')
  1378.  
  1379.   say 'Return code of semaphore ''Clear'' =' RexSem('\sem\rxtest', 'CLEAR')
  1380.  
  1381.   say 'Return code of ''Wait for semaphore clear'' =' ,
  1382.   RexSem('\sem\rxtest', 'WAIT', '1000')
  1383.  
  1384.   say 'Return code of semaphore ''Close'' =' RexSem('\sem\rxtest', 'CLOSE')
  1385.  
  1386.  
  1387.  PREV NEXT 
  1388.  
  1389.  
  1390. ΓòÉΓòÉΓòÉ 3.25. RexSetCurPos ΓòÉΓòÉΓòÉ
  1391.  
  1392.  
  1393. PREV NEXT 
  1394.  
  1395. Syntax: 
  1396.  
  1397.  
  1398.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexSetCurPos row, colΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1399.                                        ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1400.  
  1401. Purpose: 
  1402.  
  1403. Move the cursor to the specified row and column. 
  1404.  
  1405. Note:  Position (0,0) is at the upper left. VioSetCurPos() is used to perform 
  1406. this function. 
  1407.  
  1408. Arguments: 
  1409.  
  1410.  row       The row on the screen to move to (0-24). 
  1411.  
  1412.  col       The column on the screen to move to (0-79) 
  1413.  
  1414.  Returns: 
  1415.  
  1416.  Always returns '' (null string). 
  1417.  
  1418.  Example: 
  1419.  
  1420.   call RexSetCurPos '3', '0'
  1421.  
  1422.  
  1423.  PREV NEXT 
  1424.  
  1425.  
  1426. ΓòÉΓòÉΓòÉ 3.26. RexSleep ΓòÉΓòÉΓòÉ
  1427.  
  1428.  
  1429. PREV NEXT 
  1430.  
  1431. Syntax: 
  1432.  
  1433.  
  1434.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexSleep secsΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1435.                                ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1436.  
  1437. Purpose: 
  1438.  
  1439. Sleep a specified number of seconds. 
  1440.  
  1441. Arguments: 
  1442.  
  1443.  secs      Number of seconds to sleep. 
  1444.  
  1445.  Returns: 
  1446.  
  1447.  Always returns '' (null string). 
  1448.  
  1449.  Example: 
  1450.  
  1451.   sleep_seconds = 50
  1452.   call RexSleep sleep_seconds
  1453.  
  1454.  
  1455.  PREV NEXT 
  1456.  
  1457.  
  1458. ΓòÉΓòÉΓòÉ 3.27. RexStrToLONG ΓòÉΓòÉΓòÉ
  1459.  
  1460.  
  1461. PREV NEXT 
  1462.  
  1463. Syntax: 
  1464.  
  1465.  
  1466.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretn = RexStrToLONG(number)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1467.                                         ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1468.  
  1469. Purpose: 
  1470.  
  1471. Returns the Intel integer binary format (4 bytes reversed) of the argument 
  1472. number. 
  1473.  
  1474. Arguments: 
  1475.  
  1476.  number    Number to be converted. 
  1477.  
  1478.  Returns: 
  1479.  
  1480.  ''        Error in the input argument or argument could not be converted. 
  1481.  
  1482.  retn      Converted number in Intel integer binary format with a length of 4 
  1483.            bytes. 
  1484.  
  1485.  Example: 
  1486.  
  1487.   cnvnumber = RexStrToLONG(-12)
  1488.  
  1489.  
  1490.  PREV NEXT 
  1491.  
  1492.  
  1493. ΓòÉΓòÉΓòÉ 3.28. RexStrToSHORT ΓòÉΓòÉΓòÉ
  1494.  
  1495.  
  1496. PREV NEXT 
  1497.  
  1498. Syntax: 
  1499.  
  1500.  
  1501.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretn = RexStrToSHORT(number)ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1502.                                          ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1503.  
  1504. Purpose: 
  1505.  
  1506. Returns the Intel integer binary format (2 bytes reversed) of the argument 
  1507. number. 
  1508.  
  1509. Arguments: 
  1510.  
  1511.  number    Number to be converted. 
  1512.  
  1513.  Returns: 
  1514.  
  1515.  ''        Error in the input argument or argument could not be converted. 
  1516.  
  1517.  retn      Converted number in Intel integer binary format with a length of 2 
  1518.            bytes. 
  1519.  
  1520.  Example: 
  1521.  
  1522.   cnvnumber = RexStrToSHORT(-24)
  1523.  
  1524.  
  1525.  PREV NEXT 
  1526.  
  1527.  
  1528. ΓòÉΓòÉΓòÉ 3.29. RexSubcomQuery ΓòÉΓòÉΓòÉ
  1529.  
  1530.  
  1531. PREV NEXT 
  1532.  
  1533. Syntax: 
  1534.  
  1535.  
  1536.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexSubcomQuery(envnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ
  1537.                                         ΓööΓöÇΓöÇ, DLLnameΓöÇΓöÇΓöÿ     ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1538.  
  1539. Purpose: 
  1540.  
  1541. Queries for an active subcommand environment of the specified name. If the 
  1542. subcommand environment is registered, then the program may safely address that 
  1543. environment using the REXX/2 ADDRESS statement. 
  1544.  
  1545. Arguments: 
  1546.  
  1547.  envname        Name of the subcommand environment to be searched for. The 
  1548.                 parameter is NOT case sensitive. 
  1549.  
  1550.  DLLname        Optional name of the DLL containing the subcommand environment 
  1551.                 code. The parameter is NOT case sensitive. 
  1552.  
  1553.  Returns: 
  1554.  
  1555.  ''        Error in the number of input argument(s). 
  1556.  
  1557.  retc      '1' if the environment is registered, '0' if not registered. 
  1558.  
  1559.            Note:  If the DLLname is not given then a return code of '1' 
  1560.            specifies that an active environment exists. However, multiple 
  1561.            environments of the same name can exist in OS/2 and thus care should 
  1562.            be taken that subsequent commands sent to the environment are 
  1563.            executed properly. 
  1564.  
  1565.  Example: 
  1566.  
  1567.   /* Query for an active subcommand environment of "ISREDIT" */
  1568.   retc = RexSubcomQuery ('ISREDIT')
  1569.  
  1570.   /* Query for an active subcommand environment of "MYENV" */
  1571.   /* in the DLL named "MYSUB"                              */
  1572.   retc = RexSubcomQuery ('MYENV', 'MYSUB')
  1573.  
  1574.  
  1575.  PREV NEXT 
  1576.  
  1577.  
  1578. ΓòÉΓòÉΓòÉ 3.30. RexUtilVersion ΓòÉΓòÉΓòÉ
  1579.  
  1580.  
  1581. PREV NEXT 
  1582.  
  1583. Syntax: 
  1584.  
  1585.  
  1586.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇver = RexUtilVersion()ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1587.                                    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1588.  
  1589. Purpose: 
  1590.  
  1591. Returns the version of the REXXUTIL.DLL which is currently running. 
  1592.  
  1593. Arguments: 
  1594.  
  1595. None. 
  1596.  
  1597. Returns: 
  1598.  
  1599.  ver       String containing REXXUTIL version info in the form 'x.xx mmm 
  1600.            [d]d,yyyy' where 
  1601.  
  1602.     o x.xx is the version number 
  1603.     o mmm is the month of compliation 
  1604.     o dd is the day of compilation (1 or 2 characters) 
  1605.     o yyyy is the year of compliation 
  1606.  
  1607.  Example: 
  1608.  
  1609.   util_version = substr(RexUtilVersion(), 1, 4)
  1610.   util_compdate = substr(RexUtilVersion(), 6)
  1611.  
  1612.  
  1613.  PREV NEXT 
  1614.  
  1615.  
  1616. ΓòÉΓòÉΓòÉ 3.31. RexWrite ΓòÉΓòÉΓòÉ
  1617.  
  1618.  
  1619. PREV 
  1620.  
  1621. Syntax: 
  1622.  
  1623.  
  1624.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇCALL RexWrite filename, stem, numΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1625.  
  1626.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1627.          ΓööΓöÇΓöÇ, start, optΓöÇΓöÇΓöÿ    ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1628.  
  1629.  or
  1630.  
  1631.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇretc = RexWrite(filename, stem, numΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1632.  
  1633.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1634.          ΓööΓöÇΓöÇ, start, optΓöÇΓöÇΓöÿ     ΓööΓöÇΓöÇ;ΓöÇΓöÇΓöÿ
  1635.  
  1636. Purpose: 
  1637.  
  1638. Writes a specified file stem variable array to a specified file. 
  1639.  
  1640. Arguments: 
  1641.  
  1642.  filename       The name of the file to write. The parameter is NOT case 
  1643.                 sensitive. 
  1644.  
  1645.  stem           The name of the file stem variable containing the lines to be 
  1646.                 written. 
  1647.  
  1648.  num            The number of lines to write (usually stem.0) 
  1649.  
  1650.  start          The line number to start with.  Default is 1. 
  1651.  
  1652.  opt            Any one of the following: 
  1653.  
  1654.     'A'  Append the stem file to the specified file.  Create a new file if 
  1655.          specified file does not exist. 
  1656.     'R'  Replace the file specified with the stem variable (default). Create a 
  1657.          new file if specified file does not exist. 
  1658.  
  1659.          The parameter is NOT case sensitive. 
  1660.  
  1661.  Returns: 
  1662.  
  1663.  ''        Invalid number of arguments. 
  1664.  
  1665.  '0'       Stem was written successfully. 
  1666.  
  1667.  '2'       Not enough memory. 
  1668.  
  1669.  '3'       Error opening file. 
  1670.  
  1671.  '4'       Error writing file. 
  1672.  
  1673.  Example: 
  1674.  
  1675.   file.1 = 'First line to be written.'
  1676.   file.2 = 'Second line.'
  1677.   file.3 = 'Last line to be written.'
  1678.   file.0 = 3
  1679.   call RexWrite 'c:\output.txt', 'file', file.0, 1, 'A'
  1680.   /* 3 lines have been appended to the file 'c:\output.txt' */
  1681.  
  1682.  
  1683.  PREV 
  1684.  
  1685.  
  1686. ΓòÉΓòÉΓòÉ 4. Sample REXX/2 CMD using REXXUTIL ΓòÉΓòÉΓòÉ
  1687.  
  1688. The file REXTEST1.CMD is an example of the use of most of the functions 
  1689. available in the REXXUTIL.DLL package. 
  1690.  
  1691. The file REXTEST2.CMD is an example of the use of the Macro Space functions 
  1692. available in the REXXUTIL.DLL package. 
  1693.  
  1694.  
  1695. ΓòÉΓòÉΓòÉ 5. Support of REXXUTIL ΓòÉΓòÉΓòÉ
  1696.  
  1697. Support and enhancements for REXXUTIL will be performed by the author on an "as 
  1698. time permits" basis. If you have questions, comments or suggestions on 
  1699. improvements the author can be reached through the OS/2 Shareware BBS 
  1700. (703-385-4325) or at the address below: 
  1701.  
  1702.  W. David Ashley 
  1703.  5 Timberline Dr. 
  1704.  Trophy Club, Tx 76262 
  1705.